package com.demo.core.entity;

import lombok.Data;

@Data
public class R<T> {

    private Integer code = 0;

    private String msg = "success";

    private T data;

    public static <T> R<T> ok(T data) {
        R<T> objectR = new R<>();
        objectR.setData(data);
        return objectR;
    }
    public static <T> R<T> ok() {
        R<T> objectR = new R<>();
        return objectR;
    }
}
